home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectShow / Players / JukeboxASF / playvideo.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-08  |  1.8 KB  |  66 lines

  1. //------------------------------------------------------------------------------
  2. // File: PlayVideo.h
  3. //
  4. // Desc: DirectShow sample code - declarations for media control functions.
  5. //
  6. // Copyright (c) 1998-2001 Microsoft Corporation.  All rights reserved.
  7. //------------------------------------------------------------------------------
  8.  
  9.  
  10. #ifndef PLAY_VID_H
  11. #define PLAY_VID_H
  12.  
  13. //
  14. // Constants
  15. //
  16. #define VOLUME_FULL     0L
  17. #define VOLUME_SILENCE  -10000L
  18.  
  19. // Application-defined messages
  20. #define WM_GRAPHNOTIFY  WM_APP + 1
  21. #define WM_FIRSTFILE    WM_APP + 2
  22. #define WM_PLAYFILE     WM_APP + 3
  23. #define WM_NEXTFILE     WM_APP + 4
  24. #define WM_PREVIOUSFILE WM_APP + 5
  25.  
  26. //
  27. // Macros
  28. //
  29. #define SAFE_RELEASE(i) {if (i) i->Release(); i = NULL;}
  30.  
  31. #define JIF(x) if (FAILED(hr=(x))) \
  32.     {RetailOutput(TEXT("FAILED(0x%x) ") TEXT(#x) TEXT("\n"), hr); goto CLEANUP;}
  33.  
  34. //
  35. // Global data
  36. //
  37. extern IGraphBuilder *pGB;
  38. extern IMediaSeeking *pMS;
  39. extern IMediaControl *pMC;
  40. extern IMediaEventEx *pME;
  41. extern IBasicVideo   *pBV;
  42. extern IVideoWindow  *pVW;
  43.  
  44. extern FILTER_STATE g_psCurrent;
  45. extern BOOL g_bLooping, g_bAudioOnly, g_bPlayThrough;
  46. extern BOOL g_bDisplayEvents, g_bGlobalMute;
  47.  
  48.  
  49. //-----------------------------------------------------------------------------
  50. // External function-prototypes
  51. //-----------------------------------------------------------------------------
  52. HRESULT RunMedia(void);
  53. HRESULT StopMedia(void);
  54. HRESULT PauseMedia(void);
  55. HRESULT PlayMedia(LPTSTR lpszMovie, HINSTANCE hInstance);
  56. HRESULT CheckMovieState(BOOL *pbComplete);
  57. HRESULT GetInterfaces(void);
  58. HRESULT MuteAudio(void);
  59. HRESULT ResumeAudio(void);
  60. void CleanupInterfaces(void);
  61. void ToggleFullscreen(void);
  62.  
  63. void RetailOutput(TCHAR *tszErr, ...);
  64.  
  65. #endif // !defined(PLAY_VID_H)
  66.